<form class="form-inline" action="<%= admin_topics_path %>">
  <div class="form-group mr-sm-2">
      <input type="text" name="q" class="form-control" value="<%= params[:q] %>" placeholder="标题" />
  </div>

  <div class="form-group mr-sm-2">
    <select name="section_id" class="form-control">
        <option value="">所有分类</option>
        <% Section.all.each do |category| %>
          <option value="<%= category.id %>" <%= params[:section_id] == category.id ? 'selected' : '' %>><%= category.name %></option>
        <% end %>
    </select>
  </div>

  <div class='d-flex'>
    <div class="form-group mr-sm-2">
      <select name="node_id" class="form-control">
          <option value="">所有节点</option>
      </select>
    </div>

    <div class='form-group mr-sm-2'>
      <select name="audit_status" class="form-control">
          <option value="">所有审核类型</option>
          <%Topic.audit_statuses.each do |k, v| %>
            <option value="<%= v%>" <%= params[:audit_status] == k ? "selected": ''%> ><%= k%></option>
          <% end %>
      </select> 
    </div>
  </div>

  

  <div class="form-group mr-sm-2">
    <input type="text" name="login" class="form-control" value="<%= params[:login] %>" placeholder="用户名" />
  </div>
  <button class="btn btn-default">搜索</button>
</form>
